<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // 创建一个数组
        var arr = ["孙悟空", "猪八戒", "沙和尚"];
        // 向其中添加元素
        // 因为push是方法有返回值，可以返回数组的长度
        var result = arr.push("太上老君", "三清老祖", "玉皇大帝");


        var result1 = arr.pop();
        console.log(arr);
        // console.log("result:" + result);

        console.log("result1:" + result1);
    </script>
</body>

</html>